<?php include 'system/config/config.php'; ?>
<?php

//connection and instance of Outlet
Outlet::init(include ORM_ROOT.'/outlet-config.php');
$con = Outlet::getInstance();
$con->createProxies();


/*
	TEST	
	 
	$user = new User;
	$user->username = "Stefano";
	$user->password = "123456";
	$user->email = "ciccio@pasticcio.zik";
	$user->type = true;
	$user->currentDate = null;
	//$con->save($user);
	
	
	$content = new Content;
	$content->title = "Lorem ispum dolor sit amet.";
	$content->shortDesc = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.";
	$content->content = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.";
	$content->tags = "ciccio, pasticcio, capriccio, porcamerda";
	$content->user = 1;
	$content->type = 0;
	$content->currentDate = new DateTime('2009-01-28 20:24:00');
	//$con->save($content);
	
	
	$event = new Event;
	$event->address = "via Lambro, 21 - 20845 Sovico (MB)";
	$event->content = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.";
	$event->currentDate = new DateTime('2009-01-28 20:24:00');
	$event->date = new DateTime('2009-01-28 20:24:00');
	$event->shortDesc = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.";
	$event->src = "http://www.vertechsrl.it/bgResources/coloured/produzione.jpg";
	$event->stat = 0;
	$event->tags = "cazzo di buddha e di sua sorella";
	$event->title = "CONCERTO AL LOREM IPSUM";
	$event->type = 1;
	$event->user = 1;
	//$con->save($event);
	
	$media = new Media;
	$media->content = "";
	$media->currentDate = new DateTime('2009-01-28 20:24:00');
	$media->date = new DateTime('2009-01-28 20:24:00');
	$media->shortDesc = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.";
	$media->src = "http://www.youtube.com/watch?v=OQwD0QCbxaA&feature=g-all-u";
	$media->tags = "e sti cazzi che ccccaaaaldddoooo!";
	$media->title = "Simon's The Cat";
	$media->type = 0;
	$media->user = 1;
	//$con->save($media);
	
	echo "LIST OF ALL MEDIAs";
	$medias = $con->select('Media','WHERE 1', array(0, 1));
	foreach($medias as $mediaObj){
		echo '<h2>'.$mediaObj->title.'<h2/>';
		echo '<h3>'.$mediaObj->shortDesc.'</h3>';
		echo '<p>'.$mediaObj->tags.'</p>';
		echo '<h6>'.$mediaObj->content.'</h6>';
	}
*/
?>
